import { createRouter, createWebHistory } from "vue-router";
import Login from "../views/Login.vue";
import Home from "../views/Home.vue";

const router = createRouter({
  history: createWebHistory(process.env.NODE_ENV === 'production'? './webadminvue': './'), //配置子目录
  // history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: "/",
      redirect: "/login",
    },
    {
      path: "/login",
      name: "login",
      component: Login,
    },

    {
      path: "/home",
      name: "home",
      component: Home,
    },
   
  ],
});



export default router;
